<!DOCTYPE html>
<html lang="en">
<#include "/common/header.ftl">
<body>

<div id="wrapper" class="toggled">
    <#include "/common/nav.ftl">
    <div class="page-content-wrapper">
        <div class="container-fluid">
            <#include "/common/search.ftl">
        <div class="row clearfix">
            <div class="col-md-12 column">
                <table class="table table table-hover table-bordered table-condensed ">
                    <thead>
                    <tr>
                        <th>
                            编号
                        </th>
                        <th>
                            名称
                        </th>
                        <th>
                            类型
                        </th>
                        <th>
                            创建时间
                        </th>
                        <th>
                            修改时间
                        </th>
                        <th>
                            修改
                        </th>
                        <th>
                            删除
                        </th>
                    </tr>
                    </thead>
                    <tbody>
                    <#list categoryList as category>
                        <tr class="info">
                            <td>
                                ${category.categoryId}
                            </td>

                            <td>
                                ${category.categoryName}
                            </td>

                            <td>
                                ${category.categoryType}
                            </td>

                            <td>
                                ${category.createTime?string('yyyy-MM-dd HH:mm:ss')}
                            </td>

                            <td>
                                ${category.updateTime}
                            </td>

                            <td>
                                <button type="button" class="btn btn-default btn-danger" onclick="gotoIndex(${category.categoryId})">
                                    修改
                                </button>
                            </td>

                            <td>
                                <button type="button" class="btn btn-default btn-danger" onclick="gotoDelete(${category.categoryId})">
                                    删除
                                </button>
                            </td>
                        </tr>
                    </#list>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
</div>
</body>

<script>
    var gotoIndex = function (categoryId) {
        window.location.href="/productCategory/index?categoryId=" + categoryId
    }

    var gotoDelete = function (categoryId) {
        window.location.href="/productCategory/delete?categoryId=" + categoryId
    }
</script>
</html>